﻿using Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IService
{
  public  interface IOutboundManagementService
    {

        //销售订单页面分页显示
        Task<PagedViewModel<WMSOrderSalesOrder3>> GetAllWMSOutboundAsync(
string sales_order_no = null,
string document_status = null,
string customer_name = null,
 DateTime? sales_date = null,
 string sales_person = null,
string sales_dept = null,
 int currentPage = 1,
 int pageSize = 2);


        //根据销售单号查询货品明细
        Task<List<WMSOrderSalesOrder4>> GetOutboundById(string salesOrderNo);




        //根据仓库id查询库位
        Task<List<StorageLocationEntity2>> GetByWarehouseId(int warehouseId);

        //根据库位id查询库存
        Task<int> GetByLocationAndProduct(int locationId);



        // 1. 修改接口声明，增加货品编号参数
        Task<int> GetInventoryByTargetSql(int warehouseId, int locationId, string productCode);



        //出库管理的新增操作
        Task<int> AddOutboundOrderAsync(WMSKNZYDeliveryNote order, List<WMSKNZYOutboundDetails> details);






        Task<PagedViewModel<OutboundOrderDTO>> GetOutboundOrders(string outboundOrderNo = null, string outboundType = null, string outboundStatus = null, string warehouseName = null, int currentPage = 1,
 int pageSize = 2);







        /// 批量审核出库单（包含事务处理）
        /// </summary>
        /// <param name="dto">审核参数（出库单号、结果、意见）</param>
        Task AuditAsync(OutboundAuditDTO dto);


    }
}
